Robot system and method for controlling robot system

ABSTRACT

A robot system has first and second joint control units that respectively calculate first and second current values to be supplied to first and second motors based on deviations between first and second operation targets for the motors that are input from a higher device and actual operation of output shafts of the motor, and control operation of the output shafts by supplying current to the motors based on the current values, and an error estimation unit estimating an error in operation of a second joint due to bending and/or twisting of a robot arm based on the first current value and the actual operation of the output shaft of the first motor, in which the second joint control unit calculates the second current value to control the rotation angle of the output shaft of the second motor in a manner compensating for an angle error of the second joint.

TECHNICAL FIELD

The present invention relates to a robot system and a method forcontrolling the robot system.

BACKGROUND ART

Conventionally, there has been known a robot control device capable ofenhancing a vibration suppressing effect at a distal end of a robot arm(see, for example, PTL 1).

This robot control device has an angular velocity control system thatperforms, for a control target that is a robot arm having an elasticmechanism, proportional integration control of an angular velocity of amotor and outputs a current command value to the motor, an observer thathas a nonlinear dynamic model of the robot arm, receives the angularvelocity of the motor and a current command value as inputs, andestimates an axial torsion angular velocity and an angular accelerationof a link, and a state feedback unit that calculates an axial torsionangular velocity from the difference between the angular velocity of thelink estimated by the observer and the angular velocity of the motor andfeeds back the axial torsion angular velocity to the angular velocitycontrol system.

CITATION LIST Patent Literature

PTL 1: JP 2015-30076 A

SUMMARY OF INVENTION Technical Problem

However, since the robot control device described in PTL 1 estimates theaxial torsion angular velocity of an estimation target joint based onthe angular velocity of the motor included in the estimation targetjoint and the current command value for the motor, there have been caseswhere the axial torsion angular velocity cannot be estimated when thecurrent command value for the motor includes any other compensationelement.

Solution to Problem

In order to solve the above problems, a robot system according to anaspect of the present invention includes a robot arm that includes aplurality of joints including a first joint and a second joint, a firstjoint drive unit that has a first motor having an output shaft connectedto the first joint to rotate the first joint, a first detection unitthat obtains information on actual operation of the output shaft of thefirst motor, a first joint control unit that calculates a first currentvalue to be supplied to the first motor based on a deviation between afirst operation target for the first motor that is input from a higherdevice and the actual operation of the output shaft of the first motor,and controls operation of the output shaft of the first motor bysupplying current to the first motor based on the first current value, asecond joint drive unit that has a second motor having an output shaftconnected to the second joint to rotate the second joint, a seconddetection unit that obtains information on actual operation of theoutput shaft of the second motor, a second joint control unit thatcalculates a second current value to be supplied to the second motorbased on a deviation between a second operation target for the secondmotor that is input from the higher device and the actual operation ofthe output shaft of the second motor, and controls operation of theoutput shaft of the second motor by supplying current to the secondmotor based on the second current value, and an error estimation unitthat estimates an error in operation of the second joint due to bendingand/or twisting of the robot arm based on the first current value andthe actual operation of the output shaft of the first motor, in whichthe second joint control unit calculates the second current value so asto control the operation of the output shaft of the second motor in amanner compensating for the error in operation of the second joint dueto bending and/or twisting of the robot arm.

With this configuration, it is possible to prevent control to compensatefor an error in operation of the second joint due to bending and/ortwisting of the robot arm from interfering with other control. Thus,vibrations of the robot arm can be effectively suppressed, andtrajectory accuracy of a working end of the robot arm can be improved.

Advantageous Effects of Invention

The present invention has an effect of improving trajectory accuracy ofa working end of a robot arm.

BRIEF DESCRIPTION OF DRAWING

FIG. 1 is a diagram schematically illustrating a configuration exampleof a robot system according to Embodiment 1.

FIG. 2 is a block diagram schematically illustrating a configurationexample of a control system of the robot system of FIG. 1 .

FIG. 3 is an explanatory diagram of an angle transmission error.

FIG. 4 is a block diagram schematically illustrating a configurationexample of a control system of a robot system according to Embodiment 2.

FIG. 5 is a flowchart illustrating an operation example of an operatingmode switching unit of the robot system of FIG. 4 .

DESCRIPTION OF EMBODIMENTS

A robot system according to an aspect includes a robot arm that includesa plurality of joints including a first joint and a second joint, afirst joint drive unit that has a first motor having an output shaftconnected to the first joint to rotate the first joint, a firstdetection unit that obtains information on actual operation of theoutput shaft of the first motor, a first joint control unit thatcalculates a first current value to be supplied to the first motor basedon a deviation between a first operation target for the first motor thatis input from a higher device and the actual operation of the outputshaft of the first motor, and controls operation of the output shaft ofthe first motor by supplying current to the first motor based on thefirst current value, a second joint drive unit that has a second motorhaving an output shaft connected to the second joint to rotate thesecond joint, a second detection unit that obtains information on actualoperation of the output shaft of the second motor, a second jointcontrol unit that calculates a second current value to be supplied tothe second motor based on a deviation between a second operation targetfor the second motor that is input from the higher device and the actualoperation of the output shaft of the second motor, and controlsoperation of the output shaft of the second motor by supplying currentto the second motor based on the second current value, and an errorestimation unit that estimates an error in operation of the second jointdue to bending and/or twisting of the robot arm based on the firstcurrent value and the actual operation of the output shaft of the firstmotor, in which the second joint control unit calculates the secondcurrent value so as to control the operation of the output shaft of thesecond motor in a manner compensating for the error in operation of thesecond joint due to bending and/or twisting of the robot arm.

With this configuration, it is possible to prevent control to compensatefor an error in operation of the second joint due to bending and/ortwisting of the robot arm from interfering with other control. Thus,vibrations of the robot arm can be effectively suppressed, andtrajectory accuracy of a working end of the robot arm can be improved.

The information on the actual operation obtained by the first detectionunit may be at least one of an angular position, an angular velocity,and an angular acceleration of the output shaft of the first motor, thefirst operation target may be at least one of a position command, aspeed command, and an acceleration command for the first motor, thedeviation between the first operation target and the actual operation ofthe output shaft of the first motor may be at least one of a positiondeviation, a speed deviation, and an acceleration deviation, theinformation on the actual operation obtained by the second detectionunit may be at least one of an angular position, an angular velocity,and an angular acceleration of the output shaft of the second motor, thesecond operation target may be at least one of a position command, aspeed command, and an acceleration command for the second motor, thedeviation between the second operation target and the actual operationof the output shaft of the second motor may be at least one of aposition deviation, a speed deviation, and an acceleration deviation,and the error in operation of the second joint due to bending and/ortwisting of the robot arm may be at least one of an angle error, anangular velocity error, and an angular acceleration error.

With this configuration, it is possible to appropriately compensate foran error in operation of the second joint due to bending and/or twistingof the robot arm.

The error estimation unit may estimate the error in operation of thesecond joint due to bending and/or twisting of the robot arm based onone natural frequency with a small natural frequency among a pluralityof natural frequencies of coupled vibrations of a system including thefirst joint and the second joint due to bending and/or twisting of therobot arm.

With this configuration, it is possible to appropriately suppressvibrations of the robot arm caused by bending and/or twisting of therobot arm.

The second joint drive unit may further include a speed reducer that hasan input shaft connected to the output shaft of the second motor and anoutput shaft connected to the second joint, the second motor rotates thesecond joint via the speed reducer, and the robot system furthercomprises an angle transmission error estimation unit that estimates anangle transmission error between the rotation angle of the output shaftof the second motor and the rotation angle of the output shaft of thespeed reducer, and the second joint control unit may calculate thesecond current value so as to control the operation of the output shaftof the second motor in a manner compensating for the angle transmissionerror and the error in operation of the second joint due to bendingand/or twisting of the robot arm.

With this configuration, it is possible to prevent interference betweencompensation for an angle transmission error and compensation for anerror in operation due to the bending and/or twisting of the robot arm.Thus, both the compensation for an angle transmission error and thecompensation for an error in operation can be used together, andvibration of the robot arm can be effectively suppressed.

The error estimation unit may have a first error estimation unit thatestimates the error in operation of the second joint due to bendingand/or twisting of the robot arm based on the first current value andthe actual operation of the output shaft of the first motor, and asecond error estimation unit that estimates the error in operation ofthe second joint due to bending and/or twisting of the robot arm basedon the second current value and the actual operation of the output shaftof the second motor, in which the second joint control unit may have afirst mode in which the second current value is calculated so as tocontrol operation of the output shaft of the second motor in a mannercompensating for the angle transmission error and the error in operationof the second joint due to bending and/or twisting of the robot armestimated by the first error estimation unit, and a second mode in whichthe second current value is calculated so as to control operation of theoutput shaft of the second motor in a manner compensating for the errorin operation of the second joint due to bending and/or twisting of therobot arm estimated by the second error estimation unit, and the robotsystem may further include an operating mode switching unit thatinstructs the second joint control unit to switch between the first modeand the second mode.

With this configuration, it is possible to appropriately suppressvibrations of the robot arm by appropriately switching the modeaccording to conditions.

The operating mode switching unit may switch to the first mode when anoperating speed of a working end of the robot arm becomes apredetermined speed or lower.

With this configuration, it is possible to reduce influence of the angletransmission error when performing work requiring accuracy.

A method for controlling a robot system according to an aspect is amethod for controlling a robot system including a robot arm thatincludes a plurality of joints including a first joint and a secondjoint, a first joint drive unit that has a first motor having an outputshaft connected to the first joint to rotate the first joint, a firstdetection unit that obtains information on actual operation of theoutput shaft of the first motor, a first joint control unit thatcontrols operation of the output shaft of the first motor, a secondjoint drive unit that has a second motor having an output shaftconnected to the second joint to rotate the second joint, a seconddetection unit that detects an event for detecting an actual rotationangle of the output shaft of the second motor, and a second jointcontrol unit that controls operation of the output shaft of the secondmotor, the method including the steps of calculating a first currentvalue to be supplied to the first motor based on a deviation between afirst operation target for the first motor that is input from a higherdevice and the actual operation of the output shaft of the first motor,estimating an error in operation of the second joint due to bendingand/or twisting of the robot arm based on the first current value andthe actual operation of the output shaft of the first motor, calculatinga second current value to be supplied to the second motor based on adeviation between a second operation target for the second motor that isinput from the higher device and the actual operation of the outputshaft of the second motor, and calculating the second current value soas to control a rotation angle of the output shaft of the second motorin a manner compensating for an error in operation of the second joint,and supplying the second motor with current based on the second currentvalue.

With this configuration, it is possible to prevent control to compensatefor an error in operation of the second joint due to bending and/ortwisting of the robot arm from interfering with other control. Thus,vibrations of the robot arm can be effectively suppressed, andtrajectory accuracy of a working end of the robot arm can be improved.

Embodiments will be described below with reference to the drawings. Notethat the present invention is not limited by the following embodiments.Further, in the following the same or corresponding elements will bedenoted by the same reference signs throughout all the drawings, and aredundant description thereof will be omitted.

Embodiment 1

FIG. 1 is a diagram schematically illustrating a configuration exampleof a robot system 100 according to Embodiment 1.

As illustrated in FIG. 1 , the robot system 100 includes a robot 1, acontrol unit 2, and a command unit 3.

[Configuration Example of Robot]

The robot 1 is an industrial robot (articulated robot) that is anarticulated-type robot.

The robot 1 includes a base 30, a robot arm 4, and a hand 5. Forexample, the base 30 is fixed and placed on a floor surface and supportsthe robot arm 4 and the hand 5.

The robot arm 4 has a plurality of joints, and has a base end portionthat is rotatably connected to the base 30. As the joints of the robotarm 4, a plurality of joints are disposed in series from the base endportion toward a distal end portion. Among the plurality of joints ofthe robot arm 4, one joint constitutes a first joint 7 (for example, asecond axis), and another joint (for example, a third axis) differentfrom the first joint 7 constitutes a second joint 8. The first joint 7and the second joint 8 are configured so that the first joint 7 and thesecond joint 8 can be positioned in a posture to interfere with eachother. The posture in which the first joint 7 and the second joint 8interfere with each other refers to a posture in which a mutual inertiacoefficient of an inertia matrix of a dynamic equation according toEquation (1) is large.[Equation 1]T=I{circumflex over (ϕ)}+H+G  (1)where T is a vector

$\begin{bmatrix}\tau_{1} \\\tau_{2}\end{bmatrix}$of torque that is applied to a base-end side joint and a distal-end sidejoint,I is an inertia matrix

$\begin{bmatrix}I_{11} & I_{12} \\I_{21} & I_{22}\end{bmatrix},$and I₁₂ and I₂₁ are mutual coefficients of inertia,{circumflex over (ϕ)} is a vector

$\begin{bmatrix}{\overset{¨}{\phi}}_{1} \\{\overset{¨}{\phi}}_{2}\end{bmatrix}$of acceleration of the base-end side joint and the distal-end sidejoint,H is Coriolis effect and centrifugal force, andG is a gravity vector.

FIG. 2 is a block diagram schematically illustrating a configurationexample of the control system of the robot system 100 of FIG. 1 . Notethat in FIG. 2 , illustration of joints other than the first joint 7 andthe second joint 8 are omitted.

As illustrated in FIG. 2 , each joint of the robot arm 4 has a driveunit that drives the joint. Each drive unit includes a speed reducerthat has an output shaft connected to the corresponding joint (rotationshaft), a servomotor as a drive source that has an output shaftconnected to an input shaft of the speed reducer and rotates thecorresponding joint via the speed reducer, and an encoder that detects arotation angle of the output shaft of the servomotor. Thus, the outputshaft of the servomotor is connected to the corresponding joint via thespeed reducer. Further, the encoder also obtains information on actualoperation of the output shaft of the servomotor. In the presentembodiment, the encoder detects an angular position of the output shaftof the servomotor, and detects an actual rotation angle of the outputshaft of the servomotor based on the angular position. In the presentembodiment, the speed reducer of the second joint 8, that is, the secondspeed reducer 18 is, for example, a strain wave gear (Harmonic Drive(registered trademark)). Further, the speed reducer of the first joint 7is, for example, a speed reducer with a less angle transmission errorcompared to the strain wave gear.

Hereinafter, for convenience of explanation, the servomotor, the speedreducer, and the encoder that drive the first joint 7 are referred to asa first motor 11, a first speed reducer 13, and a first encoder (firstdetection unit) 12, respectively, and these constitute a first jointdrive unit 9. Further, the servomotor, the speed reducer, and theencoder that drive the second joint 8 are referred to as a second motor16, a second speed reducer 18, and a second encoder (second detectionunit) 17, respectively, and these constitute a second joint drive unit10. Note that in the present embodiment, the rotation angle means anangular position but is not limited to this. The rotation angle may be atime differential value of the angular position, that is, an angularvelocity or an angular acceleration.

The strain wave gear according to the second speed reducer 18 includes acircular spline, a flex spline, and a wave generator. The circularspline is a rigid internal gear, and is provided integrally with ahousing for example. The flex spline is an external gear havingflexibility and meshes with the circular spline. The flex spline hasfewer teeth than the circular spline and is connected to the outputshaft 18 b. The wave generator is an elliptical cam that contacts aninside of the flex spline, and is connected to an input shaft 18 a.Then, by rotating the input shaft, the wave generator moves a meshingposition between the flex spline and the circular spline, and the flexspline rotates around a rotary axis according to the difference in thenumber of teeth between the circular spline and the flex spline, and theoutput shaft rotates. The strain wave gear has characteristics suitablefor a speed reducer of a drive mechanism for a robot because of featuressuch as small size and light weight, high reduction ratio, high torquecapacity, and non-backlash.

Incidentally, as illustrated in FIG. 3 , in a speed reducer such as astrain wave gear, an angle transmission error occurs, which is adifference between a theoretical output rotation angle obtained bymultiplying an input rotation angle input to the reduction gear by areduction ratio and an actual output rotation angle, due to a processingerror or the like. This angle transmission error appears as a periodicchange accompanying rotation of the input shaft. Such an angletransmission error ATE of the speed reducer output shaft can beapproximately expressed by a model using a function according to thefollowing equation (2).[Equation 2]ATE=A sin(fθ+ϕ)  (2)where A is amplitude of an angle transmission error model function,f is a frequency of the angle transmission error model function,

(the number of waves of an angle transmission error per rotation of theoutput shaft of a motor)

θ is a rotation angle of the output shaft of a servo motor (input shaftof a speed reducer), and

ϕ is a phase of the angle transmission error model function.

As illustrated in FIG. 1 , the hand 5 is configured to be capable ofperforming a predetermined operation such as holding an article, and isattached to the distal end portion of the robot arm 4.

[Configuration Example of Control Unit]

As illustrated in FIG. 2 , the control unit 2 controls each of thejoints and includes, for example, an arithmetic unit such as amicrocontroller, a CPU, an ASIC, or a programmable logic device (PLD)such as FPGA. The arithmetic unit may be constituted of an independentarithmetic unit that performs centralized control, or may be constitutedof a plurality of arithmetic units that perform distributed control incooperation with each other. The control unit 2 includes a first jointcontrol unit 21, a second joint control unit 26, an error estimationunit 22, and an angle transmission error estimation unit 28. The firstjoint control unit 21, the second joint control unit 26, the errorestimation unit 22, and the angle transmission error estimation unit 28are functional blocks that are implemented by executing a predeterminedcontrol program by an arithmetic unit (not illustrated). Note thatalthough the control unit 2 is constituted of an arithmetic unitseparate from the command unit 3, the control unit 2 may be integratedwith the command unit 3.

The first joint control unit 21 is a PI controller(proportional-integral controller), and calculates a first current valueto be supplied to the first motor 11 based on a deviation between afirst target rotation angle (first operation target) θt1 for the firstmotor 11 input from the command unit 3 (higher device) and an actualrotation angle θ1 of the output shaft 11 a of the first motor 11detected by the first encoder 12. Then, current is supplied to the firstmotor 11 based on the first current value, so as to control the rotationangle of the output shaft 11 a of the first motor 11. That is, the firstjoint control unit 21 performs feedback control of the first motor 11based on control to make the deviation between the first target rotationangle θt1 and the actual rotation angle θ1 become close to 0, and makethe rotation angle of the output shaft 11 a of the first motor 11 becomeclose to the first target rotation angle θt1.

Further, in the process of calculating the first current value, thefirst joint control unit 21 calculates the first current value so as tocontrol the rotation angle of the output shaft 11 a of the first motor11 in a manner compensating for an angle error of the first joint 7 dueto bending and/or twisting of the robot arm 4 estimated by the errorestimation unit 22 (details will be described later).

The second joint control unit 26 is a PI controller, and calculates asecond current value to be supplied to the second motor 16 based on adeviation between a second target rotation angle (second operationtarget) θt2 for the second motor 16 input from the command unit 3 and anactual rotation angle θ2 of the output shaft 16 a of the second motor 16detected by the second encoder 17. Then, current is supplied to thesecond motor 16 based on the second current value, so as to control therotation angle of the output shaft 16 a of the second motor 16. That is,the second joint control unit 26 performs feedback control of the secondmotor 16 based on control to make the deviation between the secondtarget rotation angle θt2 and the actual rotation angle θ2 become closeto 0, and make the rotation angle of the output shaft 16 a of the secondmotor 16 become close to the second target rotation angle θt2.

Further, in the process of calculating the second current value, thesecond joint control unit 26 calculates the second current value so asto control the rotation angle of the output shaft 16 a of the secondmotor 16 in a manner compensating for an angle error of the second joint8 due to bending and/or twisting of the robot arm 4 estimated by theerror estimation unit 22 (details will be described later).

Furthermore, in the process of calculating the second current value, thesecond joint control unit 26 calculates the second current value so asto control the rotation angle of the output shaft 16 a of the secondmotor 16 in a manner compensating for an angle transmission errorbetween the rotation angle of the output shaft 16 a of the second motor16 and a rotation angle of the output shaft 18 b of the second speedreducer 18 estimated by the angle transmission error estimation unit 28(details will be described later).

Based on the first current value supplied to the first motor 11 and theactual rotation angle θ1 of the output shaft 11 a of the first motor 11,the error estimation unit 22 estimates angle errors (motion errors) ofthe first joint 7 and the second joint 8 due to bending and/or twistingof the robot arm 4. Then, a first correction amount for correcting thefirst current value is calculated based on the estimated angle error ofthe first joint 7. Furthermore, a second correction amount forcorrecting the second current value is calculated based on the estimatedangle error of the second joint 8.

That is, the error estimation unit 22 calculates angle errors of thefirst joint 7 and the second joint 8 due to bending and/or twisting ofthe robot arm 4 by using a model that receives the first current valueand the actual rotation angle θ1 of the output shaft 11 a of the firstmotor 11 as inputs, and outputs the angle errors of the first joint 7and the second joint 8 due to bending and/or twisting of the robot arm4.

Incidentally, when the robot arm 4 is bent or twisted and vibrates byoperation of the robot arm 4, due to bending and/or twisting of therobot arm 4, a deviation occurs between a theoretical rotation angle ofthe output shaft 11 a of the first motor 11 obtained from torque of theoutput shaft 11 a when the first motor 11 is supplied with current basedon the first current value and the actual rotation angle θ1 of theoutput shaft 11 a of the first motor 11. Therefore, it is possible toestimate bending and/or twisting of the robot arm 4 based on the firstcurrent value and the actual rotation angle θ1 of the output shaft 11 aof the first motor 11, and it is further possible to estimate an angleerror of each joint due to bending and/or twisting of the robot arm 4.

In the present embodiment, a model is defined in advance that receivesthe first current value and the actual rotation angle θ1 of the outputshaft 11 a of the first motor 11 as inputs, and outputs angle errors ofthe first joint 7 and the second joint 8 due to bending and/or twistingof the robot arm 4, and using this model the error estimation unit 22calculates angle errors of the first joint 7 and the second joint 8 dueto bending and/or twisting of the robot arm 4 based on the first currentvalue and the actual rotation angle θ1 of the output shaft 11 a of thefirst motor 11.

As the model, for example, a model may be built that measures in advancea relationship among the first current value, the actual rotation angleθ1 of the output shaft 11 a of the first motor 11, and angle errors ofthe first joint 7 and the second joint 8, receives the first currentvalue and the actual rotation angle θ1 of the output shaft 11 a of thefirst motor 11 as inputs from measurement values thereof, and estimatesan angle error of the first joint 7 and an angle error of the secondjoint 8. Further, a dynamic model that estimates an angle error of thefirst joint 7 and an angle error of the second joint 8 from therelationship between torque of the output shaft 11 a when the currentcorresponding to the first current value is supplied to the first motor11 and the actual rotation angle θ1 of the output shaft 11 a of thefirst motor 11 may be used to analytically calculate angle errors of thefirst joint 7 and the second joint 8.

Further, the error estimation unit 22 calculates a first correctionamount for compensating for the estimated angle error of the first joint7 and a second correction amount for compensating for the angle error ofthe second joint 8. The first correction amount and the secondcorrection amount are input to the first joint control unit 21 and thesecond joint control unit 26, respectively.

Then, in the process of calculating the first current value based on thedeviation between the first target rotation angle θt1 and the actualrotation angle θ1 of the output shaft 11 a of the first motor 11, thefirst joint control unit 21 calculates the first current value in whichthe angle error of the first joint 7 estimated by the error estimationunit 22 is compensated for by adding the first correction amount.

Further, in the process of calculating the second current value based onthe deviation between the second target rotation angle θt2 and theactual rotation angle θ2 of the output shaft 16 a of the second motor16, the second joint control unit 26 calculates the second current valuein which the angle error of the second joint 8 estimated by the errorestimation unit 22 is compensated for by adding the second correctionamount.

Further, the error estimation unit 22 estimates an angle error of thesecond joint 8 based on an eigenvalue corresponding to one naturalfrequency with a small natural frequency among a plurality of naturalfrequencies of coupled vibrations of a system including the first joint7 and the second joint 8 due to bending and/or twisting of the robot arm4. In a case of the system constituted of the first joint 7 and thesecond joint 8, an angle error of the second joint 8 is estimated basedon the eigenvalue corresponding to one natural frequency that is smallerout of two natural frequencies.

That is, vibrations of the first joint 7 and the second joint 8 areexpressed as coupled vibrations with two degrees of freedom, and areexpressed as a superposition of two natural vibration modes. A modecorresponding to one natural frequency with a small natural frequencyout of natural frequencies of the two natural vibration modes is a firstmode in which the first joint 7 and the second joint 8 vibrate in a samerotation direction as each other, and the other mode is a second mode inwhich the first joint 7 and the second joint 8 vibrate in oppositerotation directions to each other. In the present embodiment, sincevibrations of the estimation target joint (second joint 8) are estimatedonly from information obtained from the joint (first joint 7) differentfrom the estimation target joint, it is not possible to estimatevibrations for both vibration modes. Accordingly, trajectory accuracy ofthe working end (hand 5) of the robot arm 4 can be effectively improvedby estimating an angle error of the second joint 8 based on a naturalfrequency corresponding to the first mode that has greater influence ondecrease of trajectory accuracy of the working end (hand 5) of the robotarm 4, that is, one natural frequency with a small natural frequencyamong a plurality of natural frequencies of coupled vibrations of thesystem including the first joint 7 and the second joint 8.

The angle transmission error estimation unit 28 estimates an angletransmission error between the rotation angle of the output shaft 16 aof the second motor 16 and the rotation angle of the output shaft 18 bof the second speed reducer 18.

That is, the angle transmission error estimation unit 28 estimates anangle transmission error between the rotation angle of the output shaft16 a of the second motor 16 that is an input rotation angle with respectto the second speed reducer 18 and the rotation angle of the outputshaft 18 b of the second speed reducer 18 that is an output rotationangle of the second speed reducer 18 based on a periodic functionobtained by modeling a periodic variation of the angle transmissionerror according to the above equation (2). Then, the angle transmissionerror estimation unit 28 calculates a correction amount to be added tothe output shaft 16 a of the second motor 16 in order to compensate forthe angle transmission error (in order to cancel the angle transmissionerror).

For example, it has been found that a component having a frequency frelated to 2 has a particularly large influence on the angletransmission error of the strain wave gear. Therefore, the frequency fof the second speed reducer 18 constituted of the strain wave gear maybe defined as 2, and the correction amount may be calculated based onthe above equation (1) using a separately identified amplitude A andphase φ corresponding to the frequency f. Thus, the angle transmissionerror estimation unit 28 estimates the angle transmission error based onthe second target rotation angle θt2, and calculates a correction amountfor compensating for an angle transmission error of the second joint 8.

Then, in the process of calculating the second current value based onthe deviation between the second target rotation angle θt2 and theactual rotation angle θ2 of the output shaft 16 a of the second motor16, the second joint control unit 26 calculates the second current valuein which the angle error of the second joint 8 estimated by the errorestimation unit 22 and the angle transmission error of the second joint8 estimated by the angle transmission error estimation unit 28 arecompensated for by adding a correction amount for compensating for theangle transmission error of the second joint 8 estimated by the angletransmission error estimation unit 28. In this manner, the second jointcontrol unit 26 compensates for the angle transmission error byfeedforward control.

Incidentally, by the angle transmission error estimation unit 28 addingthe correction amount for compensating for the angle transmission errorof the second joint 8, a change in the second current value is one thatcombines a change due to compensation for the angle transmission errorand a change due to bending and/or twisting of the robot arm 4. When itis attempted to estimate an angle error of the second joint 8 due tobending and/or twisting of the robot arm 4 based on the second currentvalue, a compensation component for the angle transmission errorincluded in the second current value and a component related to a changeof the second current value due to bending and/or twisting of the robotarm 4 cannot be discriminated, and an error may occur in estimation ofan angle error of the second joint 8. However, in the presentembodiment, since the error estimation unit 22 is configured to estimatean angle error of the second joint based on the first current value ofthe first joint 7 that is a joint different from the second joint 8 anddoes not include a compensation component for the angle transmissionerror, it is possible to prevent that compensation for the angletransmission error with respect to the second joint 8 interferes withestimation of an angle error of the second joint 8 due to bending and/ortwisting of the robot arm 4, an error occurs in estimation of an angleerror of the second joint 8, and suppression of vibrations of the robotarm 4 fails. Thus, compensation for the angle transmission error of thesecond joint 8 and compensation for the angle error due to bendingand/or twisting of the robot arm 4 can be used together, and trajectoryaccuracy of the robot arm 4 can be further improved.

Thus, it is configured to perform compensation for the angletransmission error of the second joint 8 by feedforward control, andcompensation for an angle error of the second joint 8 due to bendingand/or twisting of the robot arm 4 by feedback control.

The command unit 3 generates a position command for each joint, that is,a target rotation angle of each joint, based on the operation programand outputs the position command. The target rotation angle of eachjoint includes a first target rotation angle θt1 for the first motor 11and a second target rotation angle θt2 for the second motor 16. Theoutput target rotation angle is input to a joint control unit includingthe first joint control unit 21 and the second joint control unit 26.

As described above, in the robot system 100, the error estimation unit22 estimates an angle error of a joint due to bending and/or twisting ofthe robot arm 4, and the first joint control unit 21 and the secondjoint control unit 26 calculate a current value in which the angle erroris compensated for, and thus trajectory accuracy of the working end ofthe robot arm 4 can be improved.

Further, in the robot system 100, since the error estimation unit 22calculates an angle error of the second joint 8 from the first currentvalue for the first motor 11 included in the first joint 7 and theactual rotation angle θ1 of the output shaft 11 a of the first motor 11,compensation for the angle transmission error with respect to the secondjoint 8 can be prevented from interfering with estimation of an angleerror of the second joint 8 due to bending and/or twisting of the robotarm 4, compensation for the angle transmission error of the second joint8 and compensation for an angle error due to bending and/or twisting ofthe robot arm 4 can be used together, and trajectory accuracy of therobot arm 4 can be further improved.

Embodiment 2

A configuration and operation of Embodiment 2 will be described below,focusing on differences from Embodiment 1.

FIG. 4 is a block diagram schematically illustrating a configurationexample of a control system of a robot system 200 according toEmbodiment 2.

In Embodiment 1, the control unit 2 of the robot system 100 includes thefirst joint control unit 21, the second joint control unit 26, and theerror estimation unit 22. On the other hand, in the present embodiment,the robot system 200 includes a first joint control unit 221, a secondjoint control unit 226, a first error estimation unit 222, a seconderror estimation unit 229, and an operating mode switching unit 230.Since the first error estimation unit 222 is configured similarly to theerror estimation unit 22 according to above Embodiment 1, a detaileddescription thereof will be omitted.

The second error estimation unit 229 estimates an angle error of thefirst joint 7 due to bending and/or twisting of the robot arm 4 based ona first current value supplied to the first motor 11 and an actualrotation angle θ1 of the output shaft 11 a of the first motor 11. Then,a third correction amount for correcting the first current value iscalculated based on the estimated angle error of the first joint 7.Further, the second error estimation unit 229 estimates an angle errorof the second joint 8 due to bending and/or twisting of the robot arm 4based on a second current value supplied to the second motor 16 and anactual rotation angle θ2 of the second motor 16. Then, a fourthcorrection amount for correcting the second current value is calculatedbased on the estimated angle error of the second joint 8. The thirdcorrection amount and the fourth correction amount are input to thefirst joint control unit 221 and the second joint control unit 226,respectively.

The operating mode switching unit 230 generates a switching commandbetween a first mode and a second mode, which will be described later,and the generated switching command is input to the first joint controlunit 221 and the second joint control unit 226.

Then, the first joint control unit 221 has a first mode and a secondmode. In the first mode, the first joint control unit 221 calculates thefirst current value so as to control a rotation angle of the outputshaft 11 a of the first motor 11 in a manner compensating for the angleerror of the first joint 7 estimated by the first error estimation unit222. That is, in the first mode, in the process of calculating the firstcurrent value based on a deviation between a first target rotation angleθt1 and the actual rotation angle θ1 of the output shaft 11 a of thefirst motor 11, the first joint control unit 221 calculates the firstcurrent value in which the angle error of the first joint 7 estimated bythe first error estimation unit 222 is compensated for by adding thefirst correction amount. Further, in the second mode, the first jointcontrol unit 221 calculates the first current value so as to control therotation angle of the output shaft 11 a of the first motor 11 in amanner compensating for the angle error of the first joint 7 estimatedby the second error estimation unit 229. That is, in the second mode, inthe process of calculating the first current value based on thedeviation between the first target rotation angle θt1 and the actualrotation angle θ1 of the output shaft 11 a of the first motor 11, thefirst joint control unit 221 calculates the first current value in whichthe angle error of the first joint 7 estimated by the second errorestimation unit 229 is compensated for by adding the third correctionamount.

Further, the second joint control unit 226 has two operating modes, afirst mode and a second mode. In the first mode, the second jointcontrol unit 226 calculates the second current value so as to controlthe rotation angle of the output shaft 16 a of the second motor 16 in amanner compensating for the angle transmission error and the angle errorof the second joint 8 estimated by the first error estimation unit 222.That is, in the first mode, in the process of calculating the secondcurrent value based on the deviation between a second target rotationangle θt2 and the actual rotation angle θ2 of the output shaft 16 a ofthe second motor 16, the second joint control unit 226 calculates thesecond current value in a manner compensating for the angle transmissionerror and the angle error of the second joint 8 estimated by the firsterror estimation unit 222 by adding the correction amount of the angletransmission error and the second correction amount. Further, in thesecond mode, the second joint control unit 226 calculates the secondcurrent value so as to control the rotation angle of the output shaft 16a of the second motor 16 in a manner compensating for the angle error ofthe second joint 8 estimated by the second error estimation unit 229.That is, in the second mode, in the process of calculating the secondcurrent value based on the deviation between the second target rotationangle θt2 and the actual rotation angle θ2 of the output shaft 16 a ofthe second motor 16, the second joint control unit 226 calculates thesecond current value in which the angle error of the second joint 8estimated by the second error estimation unit 229 is compensated for byadding the fourth correction amount.

Specifically, for the second joint 8, the first mode is a mode forperforming processing similar to operation processing of the errorestimation unit 22 in above Embodiment 1, and is a mode in which thesecond current value is calculated so as to control the rotation angleof the output shaft 16 a of the second motor 16 in a manner compensatingfor the angle transmission error and compensating for the angle error ofthe second joint 8 calculated by the first error estimation unit 222, tothereby control operation of the second motor 16. On the other hand, thesecond mode is a mode in which the second current value is calculated soas to control the rotation angle of the output shaft 16 a of the secondmotor 16 in a manner compensating for the angle error of the secondjoint 8 calculated by the second error estimation unit 229 withoutcompensating for the angle transmission error, to thereby controloperation of the second motor 16.

FIG. 5 is a flowchart illustrating an operation example of the operatingmode switching unit 230.

The operating mode switching unit 230 instructs the first joint controlunit 221 and the second joint control unit 226 to switch between thefirst mode and the second mode. Then, the operating mode switching unit230 is configured to switch to the first mode when the operating speedof the working end (hand 5) of the robot arm 4 becomes a predeterminedspeed or less. In the present embodiment, as illustrated in FIG. 5 , theoperating mode switching unit 230 determines whether or not it is astate that the operating speed of the working end of the robot arm 4 islower than a predetermined speed and the second mode is selected as theoperating mode (step S11). When the operating mode switching unit 230determines that it is a state that the operating speed of the workingend of the robot arm 4 is lower than the predetermined speed and thesecond mode is selected as the operating mode (Yes in step S11), aswitching command for switching the operating mode to the first mode isgenerated (step S12). Then, the operating mode switching unit 230 endsthe process. Thus, when work that requires high accuracy such as arcwelding is carried out, not only compensation for angle errors due tobending and/or twisting of the robot arm 4, but also compensation forangle transmission errors can be used together, and trajectory accuracycan be improved.

On the other hand, when the operating mode switching unit 230 determinesthat it is a state that the operating speed of the working end of therobot arm 4 is higher than the predetermined speed, or the first mode isselected as the operating mode (No in step S11), next, the operatingmode switching unit 230 determines whether or not it is a state that theoperating speed of the working end of the robot arm 4 is higher than thepredetermined speed and the first mode is selected as the operating mode(step S13). Then, when the operating mode switching unit 230 determinesthat it is a state that the operating speed of the working end of therobot arm 4 is higher than the predetermined speed and the first mode isselected as the operating mode (Yes in step S13), a switching commandfor switching the operating mode to the second mode is generated (stepS13). Then, the operating mode switching unit 230 ends the process.Thus, robustness can be enhanced when quick work is performed in which adecrease in trajectory accuracy due to the angle transmission error isnot a problem.

On the other hand, when the operating mode switching unit 230 determinesthat it is a state that the operating speed of the working end of therobot arm 4 is lower than the predetermined speed, or the second mode isselected as the operating mode (No in step S13), the operating modeswitching unit 230 ends the process. Then, the operating mode switchingunit 230 repeatedly executes the above process at a predetermined cycletime. The other configuration is similar to that of above Embodiment 1,and thus a detailed description thereof will be omitted.

From the above description, many improvements and other embodiments ofthe present invention will be apparent to those skilled in the art.Therefore, the above description should be construed as exemplary only,and is provided for the purpose of teaching those skilled in the art thebest mode for carrying out the present invention. Structural and/orfunctional details thereof may be substantially changed withoutdeparting from the spirit of the present invention.

REFERENCE SIGNS LIST

-   -   1 robot    -   2 control unit    -   3 command unit    -   4 robot arm    -   7 first joint    -   19    -   8 second joint    -   9 first joint drive unit    -   10 second joint drive unit    -   11 first motor    -   11 a output shaft (of the first motor)    -   12 first encoder    -   13 first speed reducer    -   13 a input shaft (of the first speed reducer)    -   13 b output shaft (of the first speed reducer)    -   16 second motor    -   16 a output shaft (of the second motor)    -   17 second encoder    -   18 second speed reducer    -   18 a input shaft of (the second speed reducer)    -   18 b output shaft (of the second speed reducer)    -   21 first joint control unit    -   22 first angle error estimation unit    -   26 second joint control unit    -   27 second angle error estimation unit    -   28 angle transmission error estimation unit    -   100 robot system

The invention claimed is:
 1. A robot system comprising: a robot arm thatincludes a plurality of joints including a first joint and a secondjoint; a first joint drive unit that has a first motor having an outputshaft connected to the first joint to rotate the first joint; a firstsensor that obtains information on actual operation of the output shaftof the first motor; circuitry that calculates a first current value tobe supplied to the first motor based on a deviation between a firstoperation target for the first motor that is input from a higher deviceand the actual operation of the output shaft of the first motor, andcontrols operation of the output shaft of the first motor by supplyingcurrent to the first motor based on the first current value; a secondjoint drive unit that has a second motor having an output shaftconnected to the second joint to rotate the second joint; and a secondsensor that obtains information on actual operation of the output shaftof the second motor, wherein the circuitry calculates a second currentvalue to be supplied to the second motor based on a deviation between asecond operation target for the second motor that is input from thehigher device and the actual operation of the output shaft of the secondmotor, and controls operation of the output shaft of the second motor bysupplying current to the second motor based on the second current value,the circuitry estimates an error in operation of the second joint due tobending and/or twisting of the robot arm based on the first currentvalue, the actual operation of the output shaft of the first motor, andthe smallest natural frequency among a plurality of natural frequenciesof coupled vibrations of a system including the first joint and thesecond joint due to bending and/or twisting of the robot arm, and thecircuitry calculates the second current value so as to control theoperation of the output shaft of the second motor in a mannercompensating for the error in operation of the second joint due tobending and/or twisting of the robot arm.
 2. The robot system accordingto claim 1, wherein the information on the actual operation obtained bythe first sensor is at least one of an angular position, an angularvelocity, and an angular acceleration of the output shaft of the firstmotor, the first operation target is at least one of a position command,a speed command, and an acceleration command for the first motor, thedeviation between the first operation target and the actual operation ofthe output shaft of the first motor is at least one of a positiondeviation, a speed deviation, and an acceleration deviation, theinformation on the actual operation obtained by the second sensor is atleast one of an angular position, an angular velocity, and an angularacceleration of the output shaft of the second motor, the secondoperation target is at least one of a position command, a speed command,and an acceleration command for the second motor, the deviation betweenthe second operation target and the actual operation of the output shaftof the second motor is at least one of a position deviation, a speeddeviation, and an acceleration deviation, and the error in operation ofthe second joint due to bending and/or twisting of the robot arm is atleast one of an angle error, an angular velocity error, and an angularacceleration error.
 3. The robot system according to claim 1, whereinthe second joint drive unit further includes a speed reducer that has aninput shaft connected to the output shaft of the second motor and anoutput shaft connected to the second joint, the second motor rotates thesecond joint via the speed reducer, the circuitry estimates an angletransmission error between a rotation angle of the output shaft of thesecond motor and a rotation angle of the output shaft of the speedreducer, and the circuitry calculates the second current value so as tocontrol the operation of the output shaft of the second motor in amanner compensating for the angle transmission error and the error inoperation of the second joint due to bending and/or twisting of therobot arm.
 4. The robot system according to claim 3, wherein thecircuitry is configured to estimate the error in operation of the secondjoint due to bending and/or twisting of the robot arm based on the firstcurrent value and the actual operation of the output shaft of the firstmotor, and is configured to estimate the error in operation of thesecond joint due to bending and/or twisting of the robot arm based onthe second current value and the actual operation of the output shaft ofthe second motor, the circuitry has a first mode in which the secondcurrent value is calculated so as to control the operation of the outputshaft of the second motor in a manner compensating for the angletransmission error and the error in operation of the second joint due tobending and/or twisting of the robot arm estimated based on the firstcurrent value and the actual operation of the output shaft of the firstmotor, and a second mode in which the second current value is calculatedso as to control the operation of the output shaft of the second motorin a manner compensating for the error in operation of the second jointdue to bending and/or twisting of the robot arm estimated based on thesecond current value and the actual operation of the output shaft of thesecond motor, and the circuitry is configured to switch between thefirst mode and the second mode.
 5. The robot system according to claim4, wherein the circuitry switches to the first mode when an operatingspeed of a working end of the robot arm becomes a predetermined speed orlower.
 6. A method for controlling a robot system including: a robot armthat includes a plurality of joints including a first joint and a secondjoint; a first joint drive unit that has a first motor having an outputshaft connected to the first joint to rotate the first joint; a firstsensor that obtains information on actual operation of the output shaftof the first motor; circuitry that controls operation of the outputshaft of the first motor; a second joint drive unit that has a secondmotor having an output shaft connected to the second joint to rotate thesecond joint; and a second sensor that detects an event for detecting anactual rotation angle of the output shaft of the second motor, whereinthe circuitry controls operation of the output shaft of the secondmotor, the method comprising the steps of: calculating a first currentvalue to be supplied to the first motor based on a deviation between afirst operation target for the first motor that is input from a higherdevice and the actual operation of the output shaft of the first motor;estimating an error in operation of the second joint due to bendingand/or twisting of the robot arm based on the first current value, theactual operation of the output shaft of the first motor, and thesmallest natural frequency among a plurality of natural frequencies ofcoupled vibrations of a system including the first joint and the secondjoint due to bending and/or twisting of the robot arm; calculating asecond current value to be supplied to the second motor based on adeviation between a second operation target for the second motor that isinput from the higher device and the actual operation of the outputshaft of the second motor, and calculating the second current value soas to control a rotation angle of the output shaft of the second motorin a manner compensating for the error in operation of the second joint;and supplying the second motor with current based on the second currentvalue.